﻿using System;
using System.Collections.Generic;
using System.Text;
using Maticsoft.DBUtility;

namespace ExtendBLL
{
    public class RecipientsApp : LabMS.BLL.RecipientsApp
    {
        public void UpdateStatus(string strNewStatus, string ID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update RecipientsApp set State ='" + strNewStatus + "' where [ID] = " + ID.ToString());
            try
            {
                DbHelperSQL.ExecuteSql(strSql.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public int SetCheck(string strNewStatus, string ID, string strCheckTime, string strChecker, string strCheckContent)
        {

            StringBuilder strSql = new StringBuilder();
           
            strSql.Append("update RecipientsApp set State ='" + strNewStatus + "', VerifyTime= '" + strCheckTime
                                + "',VerifyPerson='" + strChecker + "',VerifyComment='" + strCheckContent
                                + "'  where [ID] = " + ID.ToString());            
            try
            {
                DbHelperSQL.ExecuteSql(strSql.ToString());
                return 0;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
